Leadtools.Dicom.AddIn Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
TryGetValue Method
See Also 
Leadtools.Dicom.AddIn Namespace > Generic ThreadSafeDictionary Class : TryGetValue Method



key
The key whose value to get.
value
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
key
The key whose value to get.
value
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Gets the value associated with the specified key.

Syntax

Visual Basic (Declaration) 
Public Overridable Function TryGetValue( _
   ByVal key As TKey, _
   ByRef value As TValue _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As ThreadSafeDictionary(Of TKey,TValue)
Dim key As TKey
Dim value As TValue
Dim value As Boolean
 
value = instance.TryGetValue(key, value)
C# 
public virtual bool TryGetValue( 
   TKey key,
   out TValue value
)
C++/CLI 
public:
virtual bool TryGetValue( 
   TKey key,
   [Out] TValue value
) 

Parameters

key
The key whose value to get.
value
When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Return Value

true if the object that implements Generic IDictionary contains an element with the specified key; otherwise, false.

Exceptions

ExceptionDescription
ArgumentNullExceptionkey is null.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Dicom.AddIn requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features